package learn.letcode.tree;

import java.io.Serializable;
import java.util.List;

/**
 * node 节点类
 * @param <T>
 */
public class Node<T> implements Serializable {

    protected Node<T> parentNode;
    protected T nodeEntity;
    protected List<Node<T>> childNodes;

    public void setParentNode(Node<T> parentNode) {
        this.parentNode = parentNode;
    }

    public Node<T> getParentNode() {
        return parentNode;
    }

    public void setNodeEntity(T nodeEntity) {
        this.nodeEntity = nodeEntity;
    }

    public T getNodeEntity() {
        return nodeEntity;
    }

    public void setChildNodes(List<Node<T>> childNodes) {
        this.childNodes = childNodes;
    }

    public List<Node<T>> getChildNodes() {
        return childNodes;
    }


}
